home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / cc / g++-dist / HINTS < prev    next >
Encoding:
Emacs RMAIL  |  1990-02-28  |  16.1 KB  |  504 lines

  1. BABYL OPTIONS:
  2. Version: 5
  3. Labels:
  4. Note:   This is the header of an rmail file.
  5. Note:   If you are seeing it in rmail,
  6. Note:    it means the file has no messages in it.
  7. 
  8. 1,,
  9. Return-Path: <csmith@convex.com>
  10. Received: by teacake.sun.com (4.0/SMI-4.0)
  11.     id AA01354; Thu, 18 Jan 90 19:09:01 PST
  12. Date: Thu, 18 Jan 90 19:09:01 -0600
  13. From: csmith@convex.com (Chris Smith)
  14. To: ngo%tammy@harvard (Tom Ngo)
  15. In-Reply-To: ngo%tammy@HARVARD.HARVARD.EDU's message of 17 Jan 90 22:12:19 GMT
  16. Subject: How to use collect2... my conjecture
  17. Status: R
  18.  
  19. *** EOOH ***
  20. Return-Path: <csmith@convex.com>
  21. Date: Thu, 18 Jan 90 19:09:01 -0600
  22. From: csmith@convex.com (Chris Smith)
  23. To: ngo%tammy@harvard (Tom Ngo)
  24. In-Reply-To: ngo%tammy@HARVARD.HARVARD.EDU's message of 17 Jan 90 22:12:19 GMT
  25. Subject: How to use collect2... my conjecture
  26.  
  27. Sorry, I've been neglecting my netnews reading and didn't see your
  28. earlier messages. 
  29.  
  30. The secret of collect2.c is to install it as "/usr/local/lib/gcc-ld"
  31. --- it then does its thing with the constructors & destructors and
  32. runs the real ld.
  33. 
  34. 1,,
  35. Return-Path: <@nsfnet-relay.ac.uk,@computer-lab.cambridge.ac.uk:balen@camscan.uucp>
  36. Received: by teacake.sun.com (4.0/SMI-4.0)
  37.     id AA01354; Wed, 17 Jan 90 09:35:21  PST
  38. Date: Wed, 17 Jan 90 09:35:21 GMT
  39. From: henry Balen <balen%camscan.uucp@nsfnet-relay.ac.uk>
  40. To: bug-g++@prep.ai.mit.edu
  41. Subject: HINTS
  42. Reply-To: balen%camscan.uucp@nsfnet-relay.ac.uk
  43. Status: R
  44.  
  45. *** EOOH ***
  46. Return-Path: <@nsfnet-relay.ac.uk,@computer-lab.cambridge.ac.uk:balen@camscan.uucp>
  47. Date: Wed, 17 Jan 90 09:35:21 GMT
  48. From: henry Balen <balen%camscan.uucp@nsfnet-relay.ac.uk>
  49. To: bug-g++@prep.ai.mit.edu
  50. Subject: HINTS
  51. Reply-To: balen%camscan.uucp@nsfnet-relay.ac.uk
  52.  
  53. I have managed to get g++ 1.36.2 up and running on the sun386. I had a lot of problems with 1.36.1 in that when I did get the compiler to work it produced code that crashed!
  54. I have listed the changes that I found necessary for 1.36.2 below. I hope that these are of some help.
  55.  
  56. Henry Balen <balen%camscan.uucp@uk.ac.ukc>
  57. Camscan, Saxon Way, Bar Hill, Cambridge CB3 0JE, United Kingdom.
  58.  
  59. --------------------------------------------------------------------------
  60. In xm-sun386i.h at line 47
  61.  
  62.     #define LINK_SPEC "%{!e*:-e _start} -dc -dp %{g:-Bstatic}"
  63.  
  64. to
  65.  
  66.     #define LINK_SPEC "%{!e*:}  -Bstatic "
  67.  
  68. --------------------------------------------------------------------------
  69. In crt0.c
  70.  
  71. the
  72.     __do_global_init()
  73. and
  74.     __do_global_cleanup()
  75.  
  76. needed to be removed (I put ifndef COFF round them).
  77.  
  78. --------------------------------------------------------------------------
  79. In tm-sun386i.h at line 34
  80.  
  81.     #define STARTFILE_SPEC  \
  82.       "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
  83.  
  84. to
  85.  
  86.     #define STARTFILE_SPEC  \
  87.       "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0+.o%s}}"
  88.  
  89. --------------------------------------------------------------------------
  90. In gcc.c at line 306
  91.  
  92.     ld %{o*} %g.R %g.O
  93.  
  94. to
  95.  
  96.     ld -Bstatic -e _start %{o*} %g.R %g.O -L/vol/local/lib.sun386\n\
  97.  
  98. and at line 310
  99.  
  100.     char *link_spec = "%{!c:%{!M*:%{!E:%{!S:ld -r -o %g.R %l\
  101.  
  102. to
  103.  
  104.     char *link_spec = "%{!c:%{!M*:%{!E:%{!S:ld -r -L/vol/local/lib.sun386 -o %g.R %l\
  105. 
  106. 1,,
  107. Return-Path: <csusac!cvms!ronald@ucdavis.edu>
  108. Date: Tue, 12 Sep 89 15:40:39 edt
  109. From: csusac!cvms!ronald@ucdavis.edu
  110. To: csusac!ucdavis!prep.ai.mit.edu!info-g++@ucdavis.edu
  111. Subject: UNIX PC
  112.  
  113. *** EOOH ***
  114. Return-Path: <csusac!cvms!ronald@ucdavis.edu>
  115. Date: Tue, 12 Sep 89 15:40:39 edt
  116. From: csusac!cvms!ronald@ucdavis.edu
  117. To: csusac!ucdavis!prep.ai.mit.edu!info-g++@ucdavis.edu
  118. Subject: UNIX PC
  119.  
  120. If you have an AT&T UNIX PC, here are some patches which may be of
  121. some consolation.  They are from:
  122.  
  123. Ronald Cole               | uucp:     cvms!ronald       voice: +1 916 895 8321
  124. Senior Software Engineer  | internet: cvms!ronald@csuchico.edu
  125. CVM Systems               +----------------------------------------------------
  126.  
  127. diff -rc2 g++-1.36.0-/config/tm-att386.h g++/config/tm-att386.h
  128. *** g++-1.36.0-/config/tm-att386.h    Wed Feb 22 09:28:08 1989
  129. --- g++/config/tm-att386.h    Wed Oct 18 22:46:58 1989
  130. ***************
  131. *** 23,26 ****
  132. --- 23,29 ----
  133.   /* Define the syntax of instructions and addresses.  */
  134.   
  135. + /* G++: ATT assemblers *do not* allow '$' in symbol names. (u3b, i386, etc.) */
  136. + #define NO_DOLLAR_IN_LABEL 1
  137.   /* Define some concatenation macros to concatenate an opcode
  138.      and one, two or three operands.  In other assembler syntaxes
  139.  
  140. 
  141. 1,,
  142. Return-Path: <@ORION.CF.UCI.EDU,@paris.ics.UCI.EDU:schmidt@glacier.ICS.UCI.EDU>
  143. To: tiemann@sun.com
  144. Subject: HINTS
  145. From: "Douglas C. Schmidt" <schmidt%glacier.ics.uci.edu@ORION.CF.UCI.EDU>
  146.  
  147. *** EOOH ***
  148. Return-Path: <@ORION.CF.UCI.EDU,@paris.ics.UCI.EDU:schmidt@glacier.ICS.UCI.EDU>
  149. To: tiemann@sun.com
  150. Subject: HINTS
  151. From: "Douglas C. Schmidt" <schmidt%glacier.ics.uci.edu@ORION.CF.UCI.EDU>
  152.  
  153. Beginning with g++ version 1.36 the GNU G++ library, libg++, is no
  154. longer automatically linked with your object code when running the
  155. linker.  In order to link libg++ you need to explicity add -lg++ to
  156. your compilation command line or Makefile, e.g.,
  157.  
  158. % g++ -g -O foobar.c -lg++
  159.  
  160. The easiest way to make this change transparent to you is simply to
  161. make an alias for g++ that automagically appends -lg++ to the end.
  162.  
  163. Douglas C. Schmidt
  164. schmidt@ics.uci.edu
  165.  
  166. 
  167. 1,,
  168. Return-Path: <mlm@cs.brown.edu>
  169. From: mlm@cs.brown.edu (Moises Lejter)
  170. To: bug-g++@prep.ai.mit.edu
  171. Subject: HINTS
  172. Reply-To: mlm@cs.brown.edu
  173.  
  174. *** EOOH ***
  175. Return-Path: <mlm@cs.brown.edu>
  176. From: mlm@cs.brown.edu (Moises Lejter)
  177. To: bug-g++@prep.ai.mit.edu
  178. Subject: HINTS
  179. Reply-To: mlm@cs.brown.edu
  180.  
  181.     Sun3 SunOS 4.0: ld++ cannot find Mcrt0.o:
  182.  
  183.     Turns out that gcc.c as distributed allows you to redefine
  184.     STANDARD_STARTFILE_PREFIX to be any directory you want.  It
  185.     will check there and in /usr/local/lib     for startup files, not
  186.     in /usr/lib.  Unfortunately, most system startup files live in
  187.     /usr/lib, so unless you define STANDARD_STARTFILE_PREFIX to be
  188.     /usr/lib, you'll lose.  I changed the line in gcc.c
  189.  
  190.     char *standard_startfile_prefix_1 = "/usr/local/lib/";
  191.  
  192.     to read 
  193.  
  194.     char *standard_startfile_prefix_1 = "/usr/lib/";
  195.  
  196.     This way I can specify my own startfile directory, without
  197.     losing access to the system startup files.
  198.  
  199.                         Moises
  200.  
  201. Internet/CSnet:   mlm@cs.brown.edu        BITNET:  mlm@browncs.BITNET
  202. UUCP:    ...!uunet!brunix!mlm            Phone:     (401)863-7664
  203. USmail:  Moises Lejter, Box 1910 Brown University, Providence RI 02912
  204. 
  205. 1,,
  206. Return-Path: <tiemann>
  207. Received: by teacake.sun.com (4.0/SMI-4.0)
  208.     id AA01354; Sat, 3 Feb 90 09:02:12 PST
  209. Date: Sat, 3 Feb 90 09:02:12 PST
  210. From: tiemann (Michael Tiemann)
  211. Message-Id: <9002031702.AA01354@teacake.sun.com>
  212. To: bug-g++@prep.ai.mit.edu
  213. Subject: HINTS
  214. Reply-To: tiemann@sun.com
  215. Status: R
  216.  
  217. *** EOOH ***
  218. Return-Path: <tiemann>
  219. Date: Sat, 3 Feb 90 09:02:12 PST
  220. From: tiemann (Michael Tiemann)
  221. To: bug-g++@prep.ai.mit.edu
  222. Subject: HINTS
  223. Reply-To: tiemann@sun.com
  224.  
  225.     If you are using a non-Sun machine, and use the native
  226.     assembler instead of GAS, you will need to #define FASCIST_ASSEMBLER
  227.     when compiling cplus-decl.c.  This is because Sun's as and GAS
  228.     appear to be the only assemblers out there which assemble stabs
  229.     instead of checking them.  If you don't remember to do
  230.     this, the assembler will remind you by telling you that it did
  231.     not understand a stab which the compiler is trying to pass to
  232.     the linker.
  233.  
  234. Michael Tiemann
  235. tiemann@lurch.stanford.edu
  236. 
  237. 1,,
  238. Return-Path: <tiemann>
  239. Received: by teacake.sun.com (4.0/SMI-4.0)
  240.     id AA01354; Sat, 3 Feb 90 09:02:12 PST
  241. Date: Sat, 3 Feb 90 09:02:12 PST
  242. From: tiemann (Michael Tiemann)
  243. Message-Id: <9002031702.AA01354@teacake.sun.com>
  244. To: bug-g++@prep.ai.mit.edu
  245. Subject: HINTS
  246. Reply-To: tiemann@sun.com
  247. Status: R
  248.  
  249. *** EOOH ***
  250. Return-Path: <tiemann>
  251. Date: Sat, 3 Feb 90 09:02:12 PST
  252. From: tiemann (Michael Tiemann)
  253. To: bug-g++@prep.ai.mit.edu
  254. Subject: HINTS
  255. Reply-To: tiemann@sun.com
  256.  
  257. The 2.0 C++ language specification provides many new features which
  258. can trip up the novice user.  All of these features are being
  259. implemented in GNU C++, and most of them work right now.  However,
  260. this does not mean that they are all that easily used.  Perhaps on of
  261. the toughest new features to take advantage of right now is extern "C".
  262. What makes this hard is that up until now, C and C++ really looked
  263. like they had about the same langauge linkage.  Member functions had
  264. their names mangled, but non-overloaded global functions did not.
  265. In 2.0, all functions declared in C++ scope are automatically
  266. overloaded, and all such functions all get mangled names.  So if you
  267. declare, e.g., `int printf (const char *, ...)' in C++ language scope,
  268. and you get printf from libc.a, you will lose, since the compiler will
  269. assume that you are looking for e.g., "_printf_PQI", when you are
  270. really looking for "_printf".  To get around this problem, you can use
  271. extern "C" to tell the compiler which names should be mangled and how.
  272. There is a macro called NO_AUTO_OVERLOAD, which if defined, will provide
  273. the standard cfront 1.2 and old GNU C++ behavior.  If not defined, it
  274. provides the cfront 2.0 behavior.  One should move from the old to the
  275. new carefully, and if you get lots of new undefined symbols from the
  276. linker where such did not exist before, the first question you should
  277. ask yourself is `how is extern "C" or extern "C++" doing me in?'
  278.  
  279. Michael Tiemann
  280. tiemann@lurch.stanford.edu
  281. 
  282. 1,,
  283. Return-Path: <tiemann>
  284. Received: by teacake.sun.com (4.0/SMI-4.0)
  285.     id AA01354; Sat, 3 Feb 90 09:02:12 PST
  286. Date: Sat, 3 Feb 90 09:02:12 PST
  287. From: tiemann (Michael Tiemann)
  288. Message-Id: <9002031702.AA01354@teacake.sun.com>
  289. To: bug-g++@prep.ai.mit.edu
  290. Subject: HINTS
  291. Reply-To: tiemann@sun.com
  292. Status: R
  293.  
  294. *** EOOH ***
  295. Return-Path: <tiemann>
  296. Date: Sat, 3 Feb 90 09:02:12 PST
  297. From: tiemann (Michael Tiemann)
  298. To: bug-g++@prep.ai.mit.edu
  299. Subject: HINTS
  300. Reply-To: tiemann@sun.com
  301.  
  302. The default LINK_SPEC in gcc.c tells the linker to link
  303. with crt0+.o.  Many machine-specific files define their own
  304. LINK_SPECs.  A strategy which worked until tm-sun?-nfp-os? came along
  305. was to edit the tm-*.h file into tm-*+.h, and replace the string
  306. "crt0.o" with "crt0+.o".  This strategy is defeated with one tm-*.h
  307. file includes a file defining LINK_SPEC.  I will fix this in release
  308. 1.35.1.  In the mean time, copy LINK_SPEC from the file that is being
  309. included, #undef it and redef it in the top level tm-*.h file.
  310.  
  311.  
  312. Michael Tieman
  313. tieman@lurch.stanford.edu
  314. 
  315. 1,,
  316. Return-Path: <dwf@lanl.gov>
  317. Received: by teacake.sun.com (4.0/SMI-4.0)
  318.     id AA01354; Sat, 3 Feb 90 09:02:12 PST
  319. Date: Sat, 3 Feb 90 09:02:12 PST
  320. From: dwf@lanl.gov (Dave Forslund)
  321. To: bug-g++@prep.ai.mit.edu
  322. Subject: HINTS
  323. Reply-To: tiemann@sun.com
  324. Status: R
  325.  
  326. *** EOOH ***
  327. Return-Path: <dwf@lanl.gov>
  328. Date: Sat, 3 Feb 90 09:02:12 PST
  329. From: dwf@lanl.gov (Dave Forslund)
  330. To: bug-g++@prep.ai.mit.edu
  331. Subject: HINTS
  332. Reply-To: tiemann@sun.com
  333.  
  334. I have successfully built G++ 1.35.0 on Sun3's and Sun4's running
  335. OS4.0.3. I have to make one change to the newld complation: -Dsun3 and
  336. -Dsun4 respectively in order to get the a.out.h info included
  337. correctly.  This is apparently a change in the header files from Sun.
  338. It shouldn't hurt earlier releases of the OS.  Also a similar problem
  339. occurs in libg++ compilation with the exec struct not being defined
  340. from the a.out.h file.  I had to add -D_CROSS_TARGET_ARCH=SUN4 to the
  341. compile line for test.hello.cc to get the dynamic linking to work.
  342.  
  343. David Forslund
  344. MS E531
  345. Los Alamos National Laboratory
  346. Los Alamos, NM 87545
  347. dwf@lanl.gov
  348.  
  349. 
  350. 1,,
  351. Return-Path: <hoptoad!gnu>
  352. Received: from sun.Sun.COM by teacake.sun.com (4.0/SMI-4.0)
  353.     id AA06643; Thu, 15 Feb 90 04:13:28 PST
  354. Received: from hoptoad.UUCP by sun.Sun.COM (4.1/SMI-4.1)
  355.     id AA01279; Thu, 15 Feb 90 04:10:55 PST
  356. Received: by hop.toad.com id AA05988; Thu, 15 Feb 90 01:44:58 PST
  357. Date: Thu, 15 Feb 90 01:44:58 PST
  358. From: hoptoad!gnu (John Gilmore)
  359. Message-Id: <9002150944.AA05988@hop.toad.com>
  360. To: tiemann@sun.com
  361. Subject: Re: [comp.sys.atari.st] Re: C++ on the ST
  362. In-Reply-To: your article <10908@stag.math.lsa.umich.edu>
  363. Status: O
  364.  
  365. *** EOOH ***
  366. Return-Path: <hoptoad!gnu>
  367. Date: Thu, 15 Feb 90 01:44:58 PST
  368. From: hoptoad!gnu (John Gilmore)
  369. To: tiemann@sun.com
  370. Subject: Re: [comp.sys.atari.st] Re: C++ on the ST
  371. In-Reply-To: your article <10908@stag.math.lsa.umich.edu>
  372.  
  373. Archive-name: atari-st-g++/08-Feb-90
  374. Original-posting-by: mwjester@wsucsa.uucp
  375. Original-subject: Re: C++ on the ST
  376. Archive-site: terminator.cc.umich.edu [35.1.33.8]
  377. Reposted-by: emv@math.lsa.umich.edu (Edward Vielmetti)
  378.  
  379. In article <451@pico.oz>, akenning@pico.oz (Alan Kennington) writes:
  380. > I'm amazed that I haven't seen any mention of C++ for the Atari ST.
  381. > Does anyone if there is such a thing? After all, the IBM PC has had it for
  382. > years now.
  383. > ak.
  384. FSF's GNU project C++ is available (in not fully-debugged form) from a couple
  385. of FTP'able sites -- terminator.cc.umich.edu is one -- but from all reports
  386. it requires at least 2Mbytes to run, 4M to do anything serious, so an unex-
  387. panded 1040ST is not enough.  If you have a Mega or have expanded your ST's
  388. memory, you might want to check it out.
  389.  
  390. --
  391. Max J
  392. mwjester@wsucsa
  393.  
  394. 
  395. 1, deleted,,
  396. Return-Path: <tiemann>
  397. Received: by teacake.sun.com (4.0/SMI-4.0)
  398.     id AA01354; Sat, 3 Feb 90 09:02:12 PST
  399. Date: Sat, 3 Feb 90 09:02:12 PST
  400. From: tiemann (Michael Tiemann)
  401. Message-Id: <9002031702.AA01354@teacake.sun.com>
  402. To: bug-g++@prep.ai.mit.edu
  403. Subject: HINTS
  404. Reply-To: tiemann@sun.com
  405. Status: R
  406.  
  407. *** EOOH ***
  408. Return-Path: <tiemann>
  409. Date: Sat, 3 Feb 90 09:02:12 PST
  410. From: tiemann (Michael Tiemann)
  411. To: bug-g++@prep.ai.mit.edu
  412. Subject: HINTS
  413. Reply-To: tiemann@sun.com
  414.  
  415. I saw this at Stanford:
  416.  
  417.     >From December's Reason magazine
  418.  
  419.     Rep. Bill Schuette (R-MI) recently advised constituents not to expect
  420.     all their problems to be solved by the federal government.  He warned
  421.     voters, "Congress is not the sole suppository of wisdom."
  422.  
  423. Michael
  424.  
  425. 
  426. 1,,
  427. Return-Path: <bug-g++-request@prep.ai.mit.edu>
  428. Received: from Sun.COM (sun-barr) by teacake.sun.com (4.0/SMI-4.0)
  429.     id AA04317; Mon, 26 Feb 90 10:14:16 PST
  430. Received: from life.ai.mit.edu by Sun.COM (4.1/SMI-4.1)
  431.     id AA16343; Mon, 26 Feb 90 10:11:35 PST
  432. Received: from tut.cis.ohio-state.edu by life.ai.mit.edu (4.0/AI-4.10) id AA17718; Mon, 26 Feb 90 13:10:59 EST
  433. Received: by tut.cis.ohio-state.edu (5.61-kk/5.900222)
  434.     id AA10639; Mon, 26 Feb 90 12:57:58 -0500
  435. Received: from USENET by tut.cis.ohio-state.edu with netnews
  436.     for bug-g++@prep.ai.mit.edu (bug-g++@prep.ai.mit.edu)
  437.     (contact usenet@tut.cis.ohio-state.edu if you have questions)
  438. Date: 26 Feb 90 11:21:06 GMT
  439. From: eutws1!wsinpdb@tuegate.tue.nl  (Paul de Bra)
  440. Organization: Eindhoven University of Technology, The Netherlands
  441. Subject: g++ for sVr3.2 on a 386
  442. Message-Id: <1551@tuegate.tue.nl>
  443. Sender: bug-g++-request@prep.ai.mit.edu
  444. To: bug-g++@prep.ai.mit.edu
  445. Status: RO
  446.  
  447. *** EOOH ***
  448. Return-Path: <bug-g++-request@prep.ai.mit.edu>
  449. Date: 26 Feb 90 11:21:06 GMT
  450. From: eutws1!wsinpdb@tuegate.tue.nl  (Paul de Bra)
  451. Organization: Eindhoven University of Technology, The Netherlands
  452. Subject: g++ for sVr3.2 on a 386
  453. Sender: bug-g++-request@prep.ai.mit.edu
  454. To: bug-g++@prep.ai.mit.edu
  455.  
  456.  
  457. Here is my list of changes to g++1.36.4 to get it working with
  458. AT&T System V release 3.2u.
  459.  
  460. First of all, let me state that this applies to g++1.36.4 only.
  461. An earlier attempt to get g++1.36.0 running failed miserably.
  462.  
  463. This list only indecates how to get g++ up and running if you already
  464. have gcc with the gnu assembler and gnu-ld running, and converted the
  465. libraries to gnu format. g++ will not work with the AT&T loader.
  466.  
  467. First do the make maketest but you have to create a directory config
  468. and links to the config files from gcc yourself as system v does not
  469. have symbolic links (yet).
  470.  
  471. Do config.g++ i386-sysv-gas
  472.  
  473. Makefile
  474. - do NOT define COFFFLAGS, as we do not use coff.
  475. - define INSTALL=cp and LINK=ln as indicated in the Makefile.
  476. - do not define CLIB=-lPW as gcc does not use it.
  477. - use MALLOC=malloc.o, just to be sure.
  478. - define all to be crt1+.o g++ cc1plus ld++ g++filt
  479.  
  480. cplus-dem.c
  481. - This file needs USG defined. I just put a define on line 1.
  482.   It obviously needs a better fix.
  483.  
  484. ld.c
  485. - you don't need sys/time.h and sys/resource.h (I just commented them
  486.   out, but you should use an ifdef).
  487.  
  488. malloc.c
  489. - needs defines from config.h, so include it. (This include is ifdef-ed
  490.   emacs, but shouldn't)
  491.  
  492. That's it.
  493. Type make and you're going...
  494.  
  495. Now, libg++ still has a few problems, for instance in String.h.
  496. Don't know yet what's needed to fix that.
  497.  
  498. Paul.
  499. (debra@research.att.com)
  500.  
  501. 
  502.